package com.ymx.darling.type;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

public class TimestampHandler implements TypeHandler<Timestamp> {

    @Override
    public Timestamp getResult(ResultSet resultSet, int columIndex) throws SQLException {
        return resultSet.getTimestamp(columIndex);
    }

    @Override
    public void setParameter(PreparedStatement statement, Timestamp value, int index) throws SQLException {
        statement.setTimestamp(index, value);
    }
}
